import request from "@/utils/request";

//条件分页查询
///clazzs?name=java&begin=2023-01-01&end=2023-06-30&page=1&pageSize=5
export const queryPageApi = (name,begin,end,page,pageSize) => 
  request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)

//根据ID查询
export const queryInfoApi = (id) =>  request.get(`/clazzs/${id}`);

//修改
export const updateApi = (clazz) =>  request.put('/clazzs', clazz);

export const addApi = (clazz) =>  request.post('/clazzs', clazz);

//删除
export const deleteApi = (ids) =>  request.delete(`/clazzs?ids=${ids}`);